﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Navigation;
using System.Windows.Threading;

using SalePoints.Models;
using Visifire.Charts;
using SalePoints.Utility;
using SalePoints.WcfServices;
using SystemX.Infrastructure;


namespace SalePoints.Views
{
	public partial class Monthly : Page
	{
		protected ChartViewModel ChartView;
		public Monthly()
		{
			InitializeComponent();
			ChartView = new ChartViewModel(
				DataLegendGroup.Monthly,
				ChartHelper.AllChannel,
				new List<Chart> { chtHealth, chtMailOrder, chtShop, chtWebsite },
				chartWrapper,
				AppSettingsHelper.GetAsInt("SalePoints.Monthly.Interval")
				);
			DataContext = ChartView;
		}

		// Executes when the user navigates to this page.
		protected override void OnNavigatedTo(NavigationEventArgs e)
		{
			ChartView.OnNavigatedTo(e);
		}
	}
}
